#include<stdio.h>
int main()
{
	int money = 20;
	int i = money,space=i;
	int total = i;
	do {
		total += space / 2 ;
		space = space / 2 + space % 2;
	} while (space > 1);
	printf("%d", total);
	return 0;
}

